/**
 * 
 */
package com.gosophia.orgManagement.action;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.commons.web.logAnnotation.LogRecord;
import com.gosophia.organizationManagement.dto.PositionDTO;
import com.gosophia.organizationManagement.ws.OrganizationManagementWebService;
import com.opensymphony.xwork2.ActionContext;

/**
 * 删除职位用action
 * @author wangxinbing
 * @since  2010-12-31
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
@Controller("DeletePositionAction")
@Scope("prototype")
public class DeletePositionAction extends BaseSupportAction {

    private static final long serialVersionUID = 1L;

    private PositionDTO positionDTO;
    private List<PositionDTO> positionDTOs;
    @Autowired
    private OrganizationManagementWebService organizationManagementWebService;
    
    @LogRecord(eventAction="职位管理-删除职位",eventTarget="positionDTO")
    public String _execute()throws Exception{
        positionDTOs = organizationManagementWebService.removePosition(positionDTO);
        super.getRequestResult().setRsltCode("0");
        super.getRequestResult().setMessage("职位删除成功");
        return SUCCESS;
    }
    
    public PositionDTO getPositionDTO() {
        return positionDTO;
    }

    public void setPositionDTO(PositionDTO positionDTO) {
        this.positionDTO = positionDTO;
    }

    public List<PositionDTO> getPositionDTOs() {
        return positionDTOs;
    }

    public void setPositionDTOs(List<PositionDTO> positionDTOs) {
        this.positionDTOs = positionDTOs;
    }

}
